
use crate::tracing::*;

use pyo3::prelude::*;
use crate::components::*;

/// A Python module implemented in Rust.
#[pymodule]
fn pyo3_demo(_py: Python, m: &PyModule) -> PyResult<()> {
    init_tracing("tracing.log");
    
    // py_any
    m.add_function(wrap_pyfunction!(py_any, m)?)?;
    // py_dict
    m.add_function(wrap_pyfunction!(py_dict, m)?)?;
    // py_import
    m.add_function(wrap_pyfunction!(py_import, m)?)?;
    // with_gil
    m.add_function(wrap_pyfunction!(with_gil, m)?)?;

    m.add_function(wrap_pyfunction!(randint, m)?)?;
    Ok(())
}
